#include"userClient.h"
#include"../../server/djy/pwdcheck.h"

int userClient(int sockFd, char *username)
{
    char *UserName = username;
    //发送用户名
    int ret = sendn(sockFd, UserName, sizeof(UserName), 0);
    ERROR_CHECK(ret,-1,"send");

    char *passwd = getpass("Enter your password:\n");//客户端输入密码

    char *salt;
    get_salt(salt,passwd);
    //发送盐值
    int ret = sendn(sockFd, salt, sizeof(salt), 0);
    ERROR_CHECK(ret,-1,"send");

    //recvn()
    //这里接收服务器返回的1或是0来判断密码是否正确
    //1就让程序继续运行，0就让程序exit（1）；

    return 0;
}